package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * opc连接信息表 实体类
 * 表名：ra_opc_info
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_opc_info")
public class RaOpcInfo implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 采集器名称
     */
    @Column(name = "client_name", length = 64)
    private String clientName;
    
    /**
     * 连接状态 0未连接 1连接中 2已连接
     * 默认值: 0
     */
    @Column(name = "client_status")
    private Byte clientStatus;
    
    /**
     * opc返回错误信息
     */
    @Column(name = "client_msg", length = 255)
    private String clientMsg;
    
    /**
     * 采集器协议（DA，UA，AE，Modbus）
     */
    @Column(name = "client_protocol", length = 64)
    private String clientProtocol;
    
    /**
     * opc服务名称
     */
    @Column(name = "opc_server_prog_id", length = 64)
    private String opcServerProgId;
    
    /**
     * OPCIP地址
     */
    @Column(name = "opc_server_ip", length = 64)
    private String opcServerIp;
    
    /**
     * 是否拼接(1是0否)
     * 默认值: 1
     */
    @Column(name = "need_concat_parent")
    private Byte needConcatParent;
    
    /**
     * 位号筛选
     */
    @Column(name = "tags_concat", length = 65535)
    private String tagsConcat;
    
    /**
     * 所属层级id
     */
    @Column(name = "current_menu_id")
    private Long currentMenuId;
    
    /**
     * 所属菜单名称
     */
    @Column(name = "current_menu_name", length = 50)
    private String currentMenuName;
    
    /**
     * 所属菜单的层级
     */
    @Column(name = "current_menu_level_grade")
    private Long currentMenuLevelGrade;
    
    /**
     * UA验证方式（0匿名，1账号密码，2证书）
     * 默认值: 0
     */
    @Column(name = "ua_method")
    private Byte uaMethod;
    
    /**
     * UA账号
     */
    @Column(name = "ua_name", length = 64)
    private String uaName;
    
    /**
     * UA密码
     */
    @Column(name = "ua_password", length = 64)
    private String uaPassword;
    
    /**
     * UA证书
     */
    @Column(name = "ua_client_driver", length = 64)
    private String uaClientDriver;
    
    /**
     * 位号数量
     */
    @Column(name = "tags_count")
    private Integer tagsCount;
    
    /**
     * 备注
     */
    @Column(name = "remark", length = 65535)
    private String remark;
    
    /**
     * 是否删除（0、否1、是）
     * 默认值: 0
     */
    @Column(name = "is_del", nullable = false)
    private Byte isDel;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time", nullable = false)
    private java.time.LocalDateTime createTime;
    
    /**
     * 创建者
     */
    @Column(name = "create_by", length = 64)
    private String createBy;
    
    /**
     * 更新时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "update_time", nullable = false)
    private java.time.LocalDateTime updateTime;
    
    /**
     * 更新者
     */
    @Column(name = "update_by", length = 64)
    private String updateBy;
    
    @Override
    public String toString() {
        return "RaOpcInfo{" +
            "id=" + id +
            ", clientName=" + clientName +
            ", clientStatus=" + clientStatus +
            ", clientMsg=" + clientMsg +
            ", clientProtocol=" + clientProtocol +
            ", opcServerProgId=" + opcServerProgId +
            ", opcServerIp=" + opcServerIp +
            ", needConcatParent=" + needConcatParent +
            ", tagsConcat=" + tagsConcat +
            ", currentMenuId=" + currentMenuId +
            ", currentMenuName=" + currentMenuName +
            ", currentMenuLevelGrade=" + currentMenuLevelGrade +
            ", uaMethod=" + uaMethod +
            ", uaName=" + uaName +
            ", uaPassword=" + uaPassword +
            ", uaClientDriver=" + uaClientDriver +
            ", tagsCount=" + tagsCount +
            ", remark=" + remark +
            ", isDel=" + isDel +
            ", createTime=" + createTime +
            ", createBy=" + createBy +
            ", updateTime=" + updateTime +
            ", updateBy=" + updateBy +
        '}';
    }
} 